package com.kgc.kmall.kmallcloudmanagerweb.service;

import com.kgc.kmall.bean.PmsBaseAttrInfo;
import com.kgc.kmall.bean.PmsBaseAttrValue;
import com.kgc.kmall.kmallcloudmanagerweb.hystix.AttrFeignHystix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(value = "KMALLCLOUD-MANAGER-SERVICE",fallback = AttrFeignHystix.class)
public interface AttrService {
    @RequestMapping("/attrInfoList/{catalog3Id}")
    public List<PmsBaseAttrInfo> attrInfoList(@PathVariable(value = "catalog3Id") Long catalog3Id);

    @RequestMapping("/saveAttrInfo")
    public Integer saveAttrInfo(@RequestBody PmsBaseAttrInfo attrInfo);


    @RequestMapping("/getAttrValueList/{attrId}")
    public List<PmsBaseAttrValue> getAttrValueList(@PathVariable(value = "attrId") Long attrId);
}
